#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/sem.h>
#include <sys/ipc.h>
#include <inttypes.h>
#include <time.h>
#include <genrand.h>
#include <hexstr.h>
#include <dlfcn.h>
#include <dateTimePack.h>

int main(int argsize, const char **args)
{
    timeSdInit();
    timeSdSetUtc(8);
    {
        struct timeval tmpDateTm;
        gettimeofday(&tmpDateTm, NULL);
        timeSdSetStamp(tmpDateTm.tv_sec);
    }
    for (int i = 0; i < 1000; i++)
    {
        timeDateNanoStc tmpdt = tmSdGetDate();
        logdebug("%d-%02d-%02d %02d:%02d:%02d.%03d", tmpdt.dateval.year, tmpdt.dateval.month, tmpdt.dateval.day, tmpdt.dateval.hour,
                 tmpdt.dateval.minute, tmpdt.dateval.second, tmpdt.nanosec / 1000000);
        sleep(1);
    }
    return 1;
}